package com.bailan.foreat.service;

import com.bailan.foreat.entity.Product;
import com.bailan.foreat.vo.EsProduct;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:43
 */
public interface ProductService extends IService<Product> {

    int addProduct(Integer storeId, Product product,@RequestParam("chooseTypes[]") Integer[] chooseTypes);

    int deleteProduct(Integer productId);

    int updateProduct(Product product);

    Page<Product> selectProduct(Integer storeId, Integer currentPage, Integer pageSize);

    Page<EsProduct> searchByES(Integer currentPage, Integer pageSize, String keyName);

    Product selectById(Integer id);

}
